package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Strategy;
import cn.wolfcode.trip.base.domain.StrategyCatalog;
import cn.wolfcode.trip.base.query.QueryObject;

import java.util.List;

public interface StrategyCatalogMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyCatalog entity);

    StrategyCatalog selectByPrimaryKey(Long id);

    List<StrategyCatalog> selectAll();

    int updateByPrimaryKey(StrategyCatalog entity);

    /**
     * 根据大攻略id 查出所有的大攻略目录
     * @param qo
     * @return
     */
    List<StrategyCatalog> selectForList(QueryObject qo);

    /**
     *根据大攻略id查出该大攻略下目录序号最大值
     * @param id
     * @return
     */
    int selectForMaxSequence(Long id);

    /**
     * 根据大攻略id查出该大攻略下的目录
     * @param strategyId
     * @return
     */
    List<StrategyCatalog> selectCatalogByStrategyId(Long strategyId);
}